Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Ignore Package.resolved file #29

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from

Conversation

smnbck
Copy link

@smnbck smnbck commented Nov 25, 2019

When using the Swift Package Manager as a dependency manager the Package.resolved file is generated locally on every machine. Therefore it should be added to the .gitignore file.

@smnbck smnbck changed the title Ignore Package.resolved fiile Ignore Package.resolved file Nov 25, 2019
@fredpi
Copy link
Contributor

fredpi commented Nov 27, 2019

@smnbck The Package.resolved file is part of this repo, so it probably won't get generated, but rather edited. At least, when using Accio, it's by design that the Package.resolved file is shared via Git – this way, the accio install command can retrieve the exact dependency versions to install (In contrast to accio update where newer, possibly error-prone versions might be installed).

Why is this an issue with SPM?

@smnbck
Copy link
Author

smnbck commented Dec 10, 2019

@fredpi Whoops, I totally forgot about Accio while creating this PR. You are right, it's not generated by Accio but it is by the Swift Package Manager. It even overrides Accio's Package.resolved file and you can't use both of them together which is another problem. Currently we mostly use the SPM for new projects that's why I think we should remove Accio completely.

@SimonNumberTwo
Copy link

@fredpi sorry for intervening here. I already worked with both SPM and Accio and tried them along together which caused several major issues. As @smnbck already mentioned the Package.swift and the Package.resolved files are somehow interfering with each other or at least Xcode messes them up.

To follow Apples guidelines I would suggest using SPM instead of Accio as we can then get rid of Carthage as well. I already moved several projects from cocoapods / Accio / Carthage to SPM and having multiple dependency managers in a project is not that good as it might bring some other problems with dependencies of dependencies. So for example if you have a dependency which includes Alamofire and you are integrating it with Accio and you have another dependency which also includes Alamofire and you have to include it using cocoapods it might get you into trouble as both dependencies which use Alamofire maybe use different versions and when bundle your ipa it is not surely said which version of Alamofire is being bundled. This might lead to runtime crashes which then leads to a poor user experience.

With this said and the plan of Apple and the team at Jamit Labs to move to SPM we should drop Accio.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants